<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .single {
            width: 100px;
            height: 20px;
            overflow: hidden;
            white-space: noWrap;
            text-overflow: ellipsis;
        }

        .double {
            width: 200px;
            height: 40px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            word-break: break-all;
            /*防止多行省略不起作用*/
            /*! autoprefixer: off */
            -webkit-box-orient: vertical;
            /*! autoprefixer: on */
        }
    </style>
</head>

<body>
    <div class="single">干红荣恩伯恩肉搏嗯哦人吧农二宁波呢哦不弄嗯肉搏呢哦不呢哦让宁波恩荣不呢哦弄吧沙发位</div>
    <div class="double">干红荣恩伯恩肉搏嗯哦人吧农二宁波呢哦不弄嗯肉搏呢哦不呢哦让宁波恩荣不呢哦弄吧沙发位</div>
</body>

</html>